package com.queen.restaurant.domain;

import java.io.Serializable;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.Past;

import org.hibernate.annotations.GenericGenerator;
import org.springframework.format.annotation.DateTimeFormat;

@Entity
@Table(name="t_user")
public class User implements Serializable {

	//主键uuid
	@Id
	@Column(name="id",nullable=false,length=32)
	@GenericGenerator(name="hibernate-uuid",strategy="uuid")
	@GeneratedValue(generator="hibernate-uuid")
	private String id;
	@Column
	private String userName;
	@Column
	private String password;
	@Column
	private String gender;
	@Column
	private String phone;
	@Column
	private String birthday;
	@Column
	private int level;
	@Column
	private int credit;
	@Column
	private String userPoiId;
	
	
//	private Set<Order> orders = new HashSet<Order>();
	
	
	public User() {
	}
	
	public User(String userName, String password, String gender,
			String phone, String birthday, int level, int credit) {
		this.userName = userName;
		this.password = password;
		this.gender = gender;
		this.phone = phone;
		this.birthday = birthday;
		this.level = level;
		this.credit = credit;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getGender() {
		return gender;
	}

	public void setGender(String gender) {
		this.gender = gender;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getBirthday() {
		return birthday;
	}

	public void setBirthday(String birthday) {
		this.birthday = birthday;
	}

	public int getLevel() {
		return level;
	}

	public void setLevel(int level) {
		this.level = level;
	}

	public int getCredit() {
		return credit;
	}

	public void setCredit(int credit) {
		this.credit = credit;
	}
	
	public String getUserPoiId() {
		return userPoiId;
	}

	public void setUserPoiId(String userPoiId) {
		this.userPoiId = userPoiId;
	}

//	public Set<Order> getOrders() {
//		return orders;
//	}
//
//	public void setOrders(Set<Order> orders) {
//		this.orders = orders;
//	}
	
}
